Fix Quartz Full Screen Crash.
authorAllin Cottrell <cottrell@wfu.edu>
Mon, 22 Feb 2016 00:22:27 +0000 (16:22 -0800)
committerJohn Ralls <jralls@ceridwen.us>
Mon, 22 Feb 2016 00:22:27 +0000 (16:22 -0800)
gdk/quartz/GdkQuartzNSWindow.c
gdk/quartz/GdkQuartzView.c

index d485531d6e8caafed5c1e5a678564bb40fc272e2..e45c632aa841b6de9fc8b1b0942d9f462e417457 100644 (file)
 
 @implementation GdkQuartzNSWindow
 
+- (void)windowWillClose:(NSNotification*)notification
+{
+  // Clears the delegate when window is going to be closed; since EL
+  // Capitan it is possible that the methods of delegate would get
+  // called after the window has been closed.
+  [self setDelegate:nil];
+}
+
 -(BOOL)windowShouldClose:(id)sender
 {
   GdkWindow *window = [[self contentView] gdkWindow];
index cbd7fe5cbb0a1b81bc7040f854d8960d63a9f57d..780b5a3473a010d7635324c9a8573b4f2992833b 100644 (file)
   GdkWindowImplQuartz *impl = GDK_WINDOW_IMPL_QUARTZ (gdk_window->impl);
   NSRect rect;
 
-  if (!impl->toplevel)
+  if (!impl || !impl->toplevel)
     return;
 
   if (trackingRect)